#ifndef PRIMITIVE_H
#define PRIMITIVE_H

#include "Types.h"
#include "Material.h"
#include "Object.h"
#include "PrimitiveObject.h"
#include "ConcreteElementLoader.h"

#define MAX_PRIMITIVE_VALUES 3

class Primitive : public Object
{
public:
	Primitive() {}
	Primitive(TiXmlElement *elem);
	virtual ~Primitive(void) {}
	
	// Atributes
	Material *material;
	PrimitiveObject *primitiveObject;
	
	// Methods
	void displayElement();
	void parseMaterial(TiXmlElement *elem);
	void parseTexture(TiXmlElement *elem);

	// Class Atributes
	static map<string, ElementLoader*> primitiveLoaders;

	// Class Methods
	static void initLoaders();
	static string Value() { return "primitive"; }
};

#endif